var webpack = require("webpack");
var path = require('path');

const config = {
    entry: './src/js/router/router.js',
    output: {
        path: path.resolve(__dirname, './dist'),
        publicPath: '/dist/',
        filename: 'bundle.js'
    },
    module: {
        rules: [
            {
                test: /\.(js|jsx)$/,
                loader: 'babel-loader',
                options: {
                    presets: [
                        "es2015",
                        "react"
                    ],
                    plugins:[
                        'react-html-attrs'
                    ]
                }
            },
            {
                test: /\.css$/,
                use: [
                    'style-loader',
                    {
                        loader: 'css-loader'
                        // options: {
                        //     modules:true,
                        //     importLoaders:1,
                        //     localIdentName:'[name]__[local]--[hash:base64:5]'
                        // }
                    }
                ]
            }
        ]
    }
};

module.exports = config;
